import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CardDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Card'),
        centerTitle: true,
      ),
      body: Card(
        //阴影
        elevation: 5,
        //形状
        shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(10))),
        color: Colors.white,
        margin: EdgeInsets.all(10),
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            ListTile(
              title: Text('标题'),
              subtitle: Text('内容'),
              //最左边图片
              leading: Icon(Icons.android),
              //右边图片
              trailing: Icon(Icons.chevron_right),
            ),
            //主题设置
            ButtonTheme(
              child: ButtonBar(
                children: <Widget>[
                  FlatButton(
                      onPressed: (){},
                      child: Text('选项一')),
                  FlatButton(
                      onPressed: (){},
                      child: Text('选项二')),
                ],
              ),
            ),
            Divider(),
            Padding(padding: EdgeInsets.all(10),
              child: Text('AAAAAAA'),
            )

          ],
        ),
      ),
    );
  }
}
